export default function debounce(callback, delay = 500) {
  let pengding;
  return function debounceFn(...args) {
    clearTimeout(pengding);
    pengding = setTimeout(() => {
      callback(...args);
    }, delay);
    return null;
  };
}
